function login() {
    var name=$("#userName").val();
    var password= $("#userPassword").val();

    $.ajax({
        url: "/webapi/login/user",
        data:{
            userName:name,
            userPassword: password
        }
    }).done(function (rs) {
        if(rs>=0){
            window.location.href="/index";
        }else {
            alert("用户名或密码有误");
        }

    })
}